import cv2
import numpy as np


def do_check(driver, *args):
    r = driver.get_screenshot_as_png()
    img_array = np.fromstring(r, np.uint8)
    screen = cv2.imdecode(img_array, cv2.IMREAD_COLOR)
    for x in args:
        cv2.rectangle(screen, (x[0], x[1]), (x[2], x[3]), (0, 255, 0), 1)
    cv2.imshow('Result', screen)
    cv2.waitKey(0)
    cv2.destroyAllWindows()

